package com.wngbms.aop._02;

import com.wngbms.aop.staticproxy.EchoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ProxyFactoryBeanDemo {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("classpath:/META-INF/spring-aop-proxy-factorybean.xml");

        EchoService echoService = context.getBean("echoServiceFactoryBean", EchoService.class);
        // class com.sun.proxy.$Proxy5
        System.out.println(echoService.getClass());
        System.out.println(echoService.echo("wngbms"));

        context.close();
    }
}
